package com.mcms.util;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

public class GetParamsUtil {

	public static List getParams(HttpServletRequest request,String str,List paramsList){
		String params = McmsApiConfig.get(str);
		String[] strs = params.split(",");
		for(int i=0;i<strs.length;i++){
			String value = request.getParameter(strs[i]).toString();
			if("AGE".equals(strs[i])){
				if("".equals(value) || value==null){
					paramsList.add(0);
				}else {
					paramsList.add(Long.parseLong(value));
				}
			}else{
				paramsList.add(value);
			}
		}
		return paramsList;
	}
}
